Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

3d-css-scene

Create and manipulate a walkable 3d css scene

3dcssinteractivescenespace
Published7 Sept 2020
Direct dependencies18
Transitive dependenciesNot calculated

README

Current package documentation

3d-css-scene

Inspired by Keith Clark's CSS 3D Engine

Installation

Using npm:

npm i --save 3d-css-scene

You may enjoy tools like Webpack and Babel to import and use the 3d-css-scene making sure your ECMAScript code remains compatible with older browsers.

Importing 3d-css-scene in you whatever.js file and adding a room:

// Load the main object. Constructor will instantiate the camera and allow for objects creation.
import { Scene } from '3d-css-scene'
// Load required css styling for the scene.
import '3d-css-scene/dist/app.css'

// Instantiate the Scene object
const scene = new Scene()

// Add a room to your scene
const room = scene.createRoom('room', 3600, 1080, 3000)
room.translateZ(-200)
room.update()

Scene allows the instanciation of the main object and the creation of the following objects, via dedicated functions, where className is a string and every scaleX|Y|Z is a number:

  • Room with scene.createRoom(className, scaleX, scaleY, scaleZ)
  • Plane with scene.createPlane(className, scaleX, scaleY)
  • Box with scene.createBox(className, scaleX, scaleY, scaleZ)
  • Avatar with scene.createAvatar(className, scaleX, scaleY)

Development

Run this project

Install dependencies

npm install

Run the development server

npm start

To locally test this library you must first expose this library to your node installation directory. This wil install all dependencies and finally output a symlink message.

npm link

/your-node-path/node/v12.18.1/lib/node_modules/3d-css-scene-test -> /path-to-this-project/3d-css-scene

Then, navigate to another npm project you should link your dependencies to this library. Another symlink message will appear

npm link 3d-css-scene

/path-to-this-project/3d-css-test-app/node_modules/3d-css-scene -> /your-node-path/node/v12.18.1/lib/node_modules/3d-css-scene -> /path-to-3d-css-scene-project/3d-css-scene

This should be enough to test this dependency within another project. You can optionally add 3d-css-scene to your dependencies in package.json. The npm link 3d-css-scene command would override the package from the npm registry.

This library is exported in it's dist mode for better performance and avoid babel syntax problemas when importing. Any time you make changes to this library you'd want to see them reflected in your project. Then you can run the following, to rebuild the library at any given time:

npm run build:watch

Changes should be reflected in any project linked to this library, whenever you change a file.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 18

Native requirements
18 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
lodash.throttle
Environment
{
  "local_name": "lodash.throttle",
  "alias": false,
  "peer_metadata": null
}
^4.1.1runtime
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.10.2development
@babel/plugin-proposal-class-properties
Environment
{
  "local_name": "@babel/plugin-proposal-class-properties",
  "alias": false,
  "peer_metadata": null
}
^7.10.1development
@babel/preset-env
Environment
{
  "local_name": "@babel/preset-env",
  "alias": false,
  "peer_metadata": null
}
^7.10.2development
babel-loader
Environment
{
  "local_name": "babel-loader",
  "alias": false,
  "peer_metadata": null
}
^8.1.0development
babel-preset-es2015
Environment
{
  "local_name": "babel-preset-es2015",
  "alias": false,
  "peer_metadata": null
}
^6.24.1development
clean-webpack-plugin
Environment
{
  "local_name": "clean-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
copy-webpack-plugin
Environment
{
  "local_name": "copy-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^6.0.2development
css-loader
Environment
{
  "local_name": "css-loader",
  "alias": false,
  "peer_metadata": null
}
^3.6.0development
html-webpack-plugin
Environment
{
  "local_name": "html-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^4.3.0development
mini-css-extract-plugin
Environment
{
  "local_name": "mini-css-extract-plugin",
  "alias": false,
  "peer_metadata": null
}
^0.9.0development
optimize-css-assets-webpack-plugin
Environment
{
  "local_name": "optimize-css-assets-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^5.0.3development
style-loader
Environment
{
  "local_name": "style-loader",
  "alias": false,
  "peer_metadata": null
}
^1.2.1development
terser-webpack-plugin
Environment
{
  "local_name": "terser-webpack-plugin",
  "alias": false,
  "peer_metadata": null
}
^3.0.5development
url-loader
Environment
{
  "local_name": "url-loader",
  "alias": false,
  "peer_metadata": null
}
^4.1.0development
webpack
Environment
{
  "local_name": "webpack",
  "alias": false,
  "peer_metadata": null
}
^4.43.0development
webpack-cli
Environment
{
  "local_name": "webpack-cli",
  "alias": false,
  "peer_metadata": null
}
^3.3.11development
webpack-dev-server
Environment
{
  "local_name": "webpack-dev-server",
  "alias": false,
  "peer_metadata": null
}
^3.11.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-RC52tRK6wo/KsTZuu1cvLOTCZnMRAgV/k6kOnfD8VpxUlfQl6LR27Y2nEDV23g6EYMmlDk5m1irMslbSUqwEfw==",
  "shasum": "964ebcb24218f1bd6da0de2f7982d8b9d2f6bd67",
  "tarball": "https://registry.npmjs.org/3d-css-scene/-/3d-css-scene-1.0.1.tgz",
  "fileCount": 23,
  "unpackedSize": 221153,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVn5xCRA9TVsSAnZWagAAxqQQAIq7nDry6IkvyviCYGDM\nRjin0RSfxEFjZ6yzEZsmzeARf02jw/oDSkm/RKfw9xe7QpFVUgGC6hqMmd6G\nKvFq1SXpBJIq6eZPUCWfdjdHhVwwGFL2gpNXOUOHrWBJIzfCSKJkMaro9zzg\ndDJyGdXg0/kdFui+Ej8NuSAMS/XOLFvPHqFGv+HdqgmY6qy/dq5gdAw7zW73\ngrYQjkCzAtU3/m2dShMrwfnZ4dT4dUsHDdDOgf62kQuxiySOXeAqh7UDN5o/\nlAKO2lErWPJQaGy+XKbeYYsK4cxckL3T8JGDAjrAn2lNVXBWM7o57kYyUG36\nNHvO4/Eykee/aJxabMKNW3y4PmwA3Zq1gtancZL+0hxf9JdPpol8ENoTItX9\nABIBXXja6ArXukeM3eWKz8M103u+8ykx3lJItRvjY+2EKlU/57cZMUrvg5kq\neVbfljTuIc58mZexU73PPWmLjbvvuJjNbo/Nk3qVO5UXeuLIVkWjfxQdZ5vQ\najji04NfGKRxLbOSJZq7T1EZu/NQiMaGHAxu/Lwhm9HdBTbhOTMKoZxaunM2\nxDuAMErIxgKseP18bn3bj25X9V6Mn7ensVbhst7M31YZhZ1J2ZRvC6hN0Jex\nGnWm3zf+eQddogzzgYikAKDMkzPLb+2dOibeMYsogMUlvE45sIdeAQen9ppL\n8kri\r\n=YIpI\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIBe5CmpMwFuwqetIbAGMZQbgemzJLGx8uIelPdfsQNSbAiAEc4V5kUiFYXGPphQvPgpM+A+irnWbaLXdW3ONyt079A=="
    }
  ]
}

Repository

PENDING
ignacioguerra/3d-css-scene

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:34 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e576c6fb4ebbc5f85a75f6ea33f44b4048853231da44e0a123df35f578aeea9e

Other collected versions

1.0.513 Sept1.0.412 Sept1.0.310 Sept1.0.07 SeptView all collected versions →