Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pixi3d

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi3d - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6

15

CHANGELOG.md

@@ -7,2 +7,17 @@ # Changelog

## [Unreleased]
### Added
- Added `destroy` function to an instanced model.
- Added functionality to create a `Color` object from bytes.
### Changed
- Turn off writing to depth buffer when rendering transparent objects using `StandardMaterial`. This feature if only available in PixiJS 6.0+.
- `Color` default alpha has been changed to 1 instead of 0.
### Fixed
- Fixed an issue which caused mesh instances to be rendered even if they were `visible = false`.
- Fixed an issue which caused `StandardMaterial` not to render double sided materials correctly.
- Using `StandardMaterial` alpha mode "mask" previously rendered the object as transparent, this should no longer be the case.
- Fixed `StandardMaterial` shader for Safari with WebGL 2.0 enabled.
## [0.9.5] - 2021-05-09

@@ -9,0 +24,0 @@ ### Fixed

6

package.json
{
"name": "pixi3d",
"version": "0.9.5",
"version": "0.9.6",
"description": "The 3D renderer for PixiJS. Seamless integration with 2D applications.",

@@ -34,3 +34,2 @@ "main": "dist/pixi3d.js",

"pixi.js": "^6.0.2",
"raw-loader": "^3.1.0",
"rimraf": "^3.0.2",

@@ -43,4 +42,5 @@ "ts-loader": "^6.2.0",

"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.10.3"
"webpack-dev-server": "^3.10.3",
"webpack-glsl-loader": "^1.0.1"
}
}

@@ -8,3 +8,3 @@ /**

/**
* Creates a new color with the specified components.
* Creates a new color with the specified components (in range 0-1).
* @param r The R (red) component.

@@ -16,2 +16,10 @@ * @param g The G (green) component.

constructor(r?: number, g?: number, b?: number, a?: number);
/**
* Creates a new color with the specified components (in range 0-255).
* @param r The R (red) component.
* @param g The G (green) component.
* @param b The B (blue) component.
* @param a The A (alpha) component.
*/
static fromBytes(r?: number, g?: number, b?: number, a?: number): Color;
/** The color as an typed array containing RGB. */

@@ -18,0 +26,0 @@ get rgb(): Float32Array;

@@ -23,2 +23,3 @@ export { glTFLoader } from "./loader/gltf-loader";

export { Material } from "./material/material";
export { MaterialRenderSortType } from "./material/material-render-sort-type";
export { CubemapLoader } from "./loader/cubemap-loader";

@@ -25,0 +26,0 @@ export { Cubemap } from "./cubemap/cubemap";

@@ -0,6 +1,10 @@

import * as PIXI from "pixi.js";
import { InstancedMesh3D } from "./mesh/instanced-mesh";
import { Container3D } from "./container";
import { InstancedMesh3D } from "./mesh/instanced-mesh";
import { Model } from "./model";
export declare class InstancedModel extends Container3D {
readonly meshes: InstancedMesh3D[];
constructor(meshes: InstancedMesh3D[]);
destroy(options: boolean | PIXI.IDestroyOptions | undefined): void;
static from(model: Model): InstancedModel;
}

@@ -0,3 +1,4 @@

import * as PIXI from "pixi.js";
export declare namespace StandardShaderSource {
function build(source: string, features: string[]): string;
function build(source: string, features: string[], renderer: PIXI.Renderer): string;
}

@@ -10,3 +10,3 @@ import * as PIXI from "pixi.js";

createShaderGeometry(geometry: MeshGeometry3D, instanced: boolean): PIXI.Geometry;
render(mesh: Mesh3D, renderer: PIXI.Renderer): void;
render(mesh: Mesh3D, renderer: PIXI.Renderer, state: PIXI.State, drawMode: PIXI.DRAW_MODES): void;
}

@@ -1,3 +0,3 @@

export declare namespace Mat3 {
function multiply(a: Float32Array, b: Float32Array, out: Float32Array): Float32Array;
export declare class Mat3 {
static multiply(a: Float32Array, b: Float32Array, out: Float32Array): Float32Array;
}

@@ -1,24 +0,24 @@

export declare namespace Mat4 {
function getTranslation(mat: Float32Array, out?: Float32Array): Float32Array;
function create(): Float32Array;
function getScaling(mat: Float32Array, out?: Float32Array): Float32Array;
function getRotation(mat: Float32Array, out?: Float32Array): Float32Array;
function copy(a: Float32Array, out?: Float32Array): Float32Array;
function fromQuat(q: Float32Array, out?: Float32Array): Float32Array;
function fromRotationTranslationScale(q: Float32Array, v: Float32Array, s: Float32Array, out?: Float32Array): Float32Array;
function fromRotation(rad: number, axis: Float32Array, out?: Float32Array): Float32Array;
function fromScaling(v: Float32Array, out?: Float32Array): Float32Array;
function fromTranslation(v: Float32Array, out?: Float32Array): Float32Array;
function multiply(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
function lookAt(eye: Float32Array, center: Float32Array, up: Float32Array, out?: Float32Array): Float32Array;
function identity(out?: Float32Array): Float32Array;
function perspective(fovy: number, aspect: number, near: number, far: number, out?: Float32Array): Float32Array;
function ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, out?: Float32Array): Float32Array;
function invert(a: Float32Array, out?: Float32Array): Float32Array;
function transpose(a: Float32Array, out?: Float32Array): Float32Array;
function targetTo(eye: Float32Array, target: Float32Array, up: Float32Array, out?: Float32Array): Float32Array;
function rotateX(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
function rotateY(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
function rotateZ(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
function rotate(a: Float32Array, rad: number, axis: Float32Array, out?: Float32Array): Float32Array;
export declare class Mat4 {
static getTranslation(mat: Float32Array, out?: Float32Array): Float32Array;
static create(): Float32Array;
static getScaling(mat: Float32Array, out?: Float32Array): Float32Array;
static getRotation(mat: Float32Array, out?: Float32Array): Float32Array;
static copy(a: Float32Array, out?: Float32Array): Float32Array;
static fromQuat(q: Float32Array, out?: Float32Array): Float32Array;
static fromRotationTranslationScale(q: Float32Array, v: Float32Array, s: Float32Array, out?: Float32Array): Float32Array;
static fromRotation(rad: number, axis: Float32Array, out?: Float32Array): Float32Array;
static fromScaling(v: Float32Array, out?: Float32Array): Float32Array;
static fromTranslation(v: Float32Array, out?: Float32Array): Float32Array;
static multiply(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
static lookAt(eye: Float32Array, center: Float32Array, up: Float32Array, out?: Float32Array): Float32Array;
static identity(out?: Float32Array): Float32Array;
static perspective(fovy: number, aspect: number, near: number, far: number, out?: Float32Array): Float32Array;
static ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, out?: Float32Array): Float32Array;
static invert(a: Float32Array, out?: Float32Array): Float32Array;
static transpose(a: Float32Array, out?: Float32Array): Float32Array;
static targetTo(eye: Float32Array, target: Float32Array, up: Float32Array, out?: Float32Array): Float32Array;
static rotateX(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
static rotateY(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
static rotateZ(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
static rotate(a: Float32Array, rad: number, axis: Float32Array, out?: Float32Array): Float32Array;
}

@@ -1,12 +0,12 @@

export declare namespace Quat {
function set(x: number, y: number, z: number, w: number, out?: Float32Array): Float32Array;
function fromValues(x: number, y: number, z: number, w: number): Float32Array;
function create(): Float32Array;
function normalize(a: Float32Array, out?: Float32Array): Float32Array;
function slerp(a: Float32Array, b: Float32Array, t: number, out?: Float32Array): Float32Array;
function fromEuler(x: number, y: number, z: number, out?: Float32Array): Float32Array;
function conjugate(a: Float32Array, out?: Float32Array): Float32Array;
function rotateX(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
function rotateY(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
function rotateZ(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
export declare class Quat {
static set(x: number, y: number, z: number, w: number, out?: Float32Array): Float32Array;
static fromValues(x: number, y: number, z: number, w: number): Float32Array;
static create(): Float32Array;
static normalize(a: Float32Array, out?: Float32Array): Float32Array;
static slerp(a: Float32Array, b: Float32Array, t: number, out?: Float32Array): Float32Array;
static fromEuler(x: number, y: number, z: number, out?: Float32Array): Float32Array;
static conjugate(a: Float32Array, out?: Float32Array): Float32Array;
static rotateX(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
static rotateY(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
static rotateZ(a: Float32Array, rad: number, out?: Float32Array): Float32Array;
}

@@ -1,20 +0,20 @@

export declare namespace Vec3 {
function set(x: number, y: number, z: number, out?: Float32Array): Float32Array;
function fromValues(x: number, y: number, z: number): Float32Array;
function create(): Float32Array;
function add(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
function transformQuat(a: Float32Array, q: Float32Array, out?: Float32Array): Float32Array;
function subtract(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
function scale(a: Float32Array, b: number, out?: Float32Array): Float32Array;
function dot(a: Float32Array, b: Float32Array): number;
function normalize(a: Float32Array, out?: Float32Array): Float32Array;
function cross(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
function transformMat4(a: Float32Array, m: Float32Array, out?: Float32Array): Float32Array;
function copy(a: Float32Array, out?: Float32Array): Float32Array;
function length(a: Float32Array): number;
function inverse(a: Float32Array, out?: Float32Array): Float32Array;
function negate(a: Float32Array, out?: Float32Array): Float32Array;
function multiply(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
function distance(a: Float32Array, b: Float32Array): number;
function squaredDistance(a: Float32Array, b: Float32Array): number;
export declare class Vec3 {
static set(x: number, y: number, z: number, out?: Float32Array): Float32Array;
static fromValues(x: number, y: number, z: number): Float32Array;
static create(): Float32Array;
static add(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
static transformQuat(a: Float32Array, q: Float32Array, out?: Float32Array): Float32Array;
static subtract(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
static scale(a: Float32Array, b: number, out?: Float32Array): Float32Array;
static dot(a: Float32Array, b: Float32Array): number;
static normalize(a: Float32Array, out?: Float32Array): Float32Array;
static cross(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
static transformMat4(a: Float32Array, m: Float32Array, out?: Float32Array): Float32Array;
static copy(a: Float32Array, out?: Float32Array): Float32Array;
static magnitude(a: Float32Array): number;
static inverse(a: Float32Array, out?: Float32Array): Float32Array;
static negate(a: Float32Array, out?: Float32Array): Float32Array;
static multiply(a: Float32Array, b: Float32Array, out?: Float32Array): Float32Array;
static distance(a: Float32Array, b: Float32Array): number;
static squaredDistance(a: Float32Array, b: Float32Array): number;
}

@@ -1,4 +0,4 @@

export declare namespace Vec4 {
function set(x: number, y: number, z: number, w: number, out: Float32Array): Float32Array;
function transformMat4(a: Float32Array, m: Float32Array, out: Float32Array): Float32Array;
export declare class Vec4 {
static set(x: number, y: number, z: number, w: number, out: Float32Array): Float32Array;
static transformMat4(a: Float32Array, m: Float32Array, out: Float32Array): Float32Array;
}

@@ -8,11 +8,4 @@ import * as PIXI from "pixi.js";

export declare class MeshShader extends PIXI.Shader {
/** Default state used to render a mesh. */
state: PIXI.State & {
culling: boolean;
clockwiseFrontFace: boolean;
depthTest: boolean;
};
/** Default draw mode used to render a mesh. */
drawMode: PIXI.DRAW_MODES;
/** The name of the mesh shader. Used for figuring out if geometry attributes is compatible with the shader. This needs to be set to something different than default value when custom attributes is used.*/
private _state;
/** The name of the mesh shader. Used for figuring out if geometry attributesis compatible with the shader. This needs to be set to something different than default value when custom attributes is used. */
get name(): string;

@@ -19,0 +12,0 @@ /**

@@ -7,3 +7,3 @@ import * as PIXI from "pixi.js";

export declare class ShadowShader extends MeshShader {
constructor(features?: string[]);
constructor(renderer: PIXI.Renderer, features?: string[]);
createShaderGeometry(geometry: MeshGeometry3D): PIXI.Geometry;

@@ -10,0 +10,0 @@ get name(): string;

@@ -10,3 +10,3 @@ import * as PIXI from "pixi.js";

static isSupported(renderer: PIXI.Renderer): boolean;
constructor();
constructor(renderer: PIXI.Renderer);
createShaderGeometry(geometry: MeshGeometry3D): PIXI.Geometry;

@@ -13,0 +13,0 @@ get name(): string;

import * as PIXI from "pixi.js";
import { Cubemap } from "../cubemap/cubemap";
import { MeshShader } from "../mesh/mesh-shader";
import { Camera } from "../camera/camera";
import { Mesh3D } from "../mesh/mesh";
import { Material } from "../material/material";
import { Cubemap } from "../cubemap/cubemap";
import { MeshShader } from "../mesh/mesh-shader";
export declare class SkyboxMaterial extends Material {

@@ -8,0 +8,0 @@ private _cubemap;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc