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 1.5.1 to 1.6.0

pixi-types/pixi-v6.d.ts

16

CHANGELOG.md

@@ -7,5 +7,19 @@ # Changelog

## [1.6.0] - 2022-08-14
### Added
- Added support for PixiJS extensions API.
- Added `Vec3.lerp`.
### Fixed
- Fixed an issue which could cause instanced meshes to not render correctly after changing visibility for those objects.
- Fixed an issue which caused glTF embedded images to not load correctly.
### Changed
- The default value for `alphaMode` on `StandardMaterial` was changed to `blend` to make it easier to render transparent objects without having to change `alphaMode`. To get the previous behavior, set `alphaMode` to `opaque`.
- `Sprite3D` objects are now rendered after all meshes to fix draw order issues.
- `Sprite3D` objects are now rendered from back to front by default.
## [1.5.1] - 2022-07-26
### Fixed
- Removed peer dependencies from `package.json` which caused issues with multiple PixiJS versions when using bundlers.
- Removed peer dependencies from `package.json` which could cause issues with multiple PixiJS versions when using bundlers.

@@ -12,0 +26,0 @@ ## [1.5.0] - 2022-07-23

5

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

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

"dist/**/*",
"pixi-types/**/*",
"types/**/*"

@@ -54,3 +55,3 @@ ],

"pixelmatch": "^5.2.1",
"pixi.js": "^6.0.2",
"pixi.js": "^6.5.1",
"rimraf": "^3.0.2",

@@ -57,0 +58,0 @@ "rollup": "^2.75.7",

@@ -18,4 +18,15 @@ # Pixi3D

## Getting started
Let's create a simple application which renders a rotating cube. Start by [getting the latest version of Pixi3D](https://github.com/jnsmalm/pixi3d/releases). Also [download PixiJS](https://github.com/pixijs/pixi.js/releases) (Pixi3D is compatible with all versions from 5.3 and later) which is needed to use Pixi3D.
The easiest way to get started is to use `create-pixi3d-app` which creates a simple project with everything needed to start immediatly. Node.js must be installed, go to https://nodejs.org to download.
```
npx create-pixi3d-app my-pixi3d-app
cd my-pixi3d-app
npm start
```
Another more old fashioned method to get started:
- [Download the latest version of Pixi3D](https://github.com/jnsmalm/pixi3d/releases)
- [Download PixiJS](https://github.com/pixijs/pixi.js/releases) (Pixi3D is compatible with all versions from 5.3 and later)
Next, create a file *app.js* with the following contents.

@@ -52,30 +63,2 @@

### Install with npm
Pixi3D is also available as a npm package. Install the latest release with `npm install pixi3d --save-dev`. This requires that an up-to-date version of Node.js is already installed.
### Using bundlers
For Pixi3D to be installed correctly to PixiJS as a plugin when using a bundler (like webpack or rollup), it's important that the app code and Pixi3D is using the same version of PixiJS (if there is more than one PixiJS version installed). To ensure that only a single version of PixiJS is used across the app, set alias in the bundler config file. For example, the webpack configuration may look like this:
*webpack.config.js*
```javascript
const path = require("path")
module.exports = {
// ...
resolve: {
alias: {
"@pixi/core": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/core"),
"@pixi/loaders": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/loaders"),
"@pixi/settings": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/settings"),
"@pixi/math": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/math"),
"@pixi/display": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/display"),
"@pixi/constants": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/constants"),
"@pixi/utils": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/utils"),
"@pixi/ticker": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/ticker"),
"@pixi/sprite": path.resolve(__dirname, "node_modules/pixi.js/node_modules/@pixi/sprite")
}
}
}
```
## Examples

@@ -237,2 +220,5 @@ Examples are available as sandboxes at https://codesandbox.io to quickly get started. Download repo at https://github.com/jnsmalm/pixi3d-sandbox to instead run them locally.

## Changelog
All notable changes to this project will be documented in the [changelog](CHANGELOG.md)
## Development

@@ -239,0 +225,0 @@ For developing new features or fixing bugs, use *serve/src/index.js* with `npm run serve`.

@@ -1,2 +0,2 @@

import { CubeResource } from "../resource/cube-resource";
import { CubeResource } from "../compatibility/cube-resource";
import { Renderer } from "@pixi/core";

@@ -3,0 +3,0 @@ import { MipmapResource } from "./mipmap-resource";

@@ -1,2 +0,2 @@

import { ArrayResource } from "../resource/array-resource";
import { ArrayResource } from "../compatibility/array-resource";
import { Texture, BaseTexture, Renderer } from "@pixi/core";

@@ -3,0 +3,0 @@ export declare class MipmapResource extends ArrayResource {

@@ -27,3 +27,3 @@ import { Renderer, Shader } from "@pixi/core";

private _baseColorTexture?;
private _baseColor;
private _baseColorFactor;
private _normalTexture?;

@@ -30,0 +30,0 @@ private _occlusionTexture?;

@@ -0,1 +1,2 @@

import { vec3 } from "gl-matrix";
export declare class Vec3 {

@@ -15,2 +16,3 @@ static set(x: number, y: number, z: number, out?: Float32Array): Float32Array;

static magnitude(a: Float32Array): number;
static squaredMagnitude(a: Float32Array): number;
static inverse(a: Float32Array, out?: Float32Array): Float32Array;

@@ -21,2 +23,3 @@ static negate(a: Float32Array, out?: Float32Array): Float32Array;

static squaredDistance(a: Float32Array, b: Float32Array): number;
static lerp(a: Float32Array, b: Float32Array, t: number, out?: Float32Array): vec3;
}

@@ -9,2 +9,4 @@ import { ObjectRenderer, Renderer } from "@pixi/core";

import { RenderPass } from "./render-pass";
import { SpriteBatchRenderer } from "../sprite/sprite-batch-renderer";
import { ProjectionSprite } from "../sprite/projection-sprite";
/**

@@ -16,3 +18,5 @@ * The standard pipeline renders meshes using the set render passes. It's

renderer: Renderer;
private _meshes;
protected _spriteRenderer: SpriteBatchRenderer;
protected _meshes: Mesh3D[];
protected _sprites: ProjectionSprite[];
/** The pass used for rendering materials. */

@@ -36,6 +40,6 @@ materialPass: MaterialRenderPass;

/**
* Adds a mesh to be rendered.
* @param mesh The mesh to render.
* Adds an object to be rendered.
* @param object The object to render.
*/
render(mesh: Mesh3D): void;
render(object: Mesh3D | ProjectionSprite): void;
/**

@@ -42,0 +46,0 @@ * Renders the added meshes using the specified render passes.

@@ -5,2 +5,3 @@ import { Sprite } from "@pixi/sprite";

private _pixelsPerUnit;
distanceFromCamera: number;
modelViewProjection: Float32Array;

@@ -7,0 +8,0 @@ constructor(texture?: Texture<Resource>);

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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