0.0.50 • Published 3 years ago

pc-ex v0.0.50

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

pc-ex

Install

npm i pc-ex

ES usage:

// Import all to use extend functions
import * as pc from "playcanvas";
import * as pcEX from "pc-ex";

let rotation = new pc.Quat();
rotation.setLookRotation(position, target, up);


// Import named
import { DebugLine } from"pc-ex";

DebugLine.drawLine(start, end, color);


// use ex tools
import { use, RuntimeTransformHandle } from "pc-ex";

// through use api
let runtimeTransformHandle = use(RuntimeTransformHandle, { mainCamera: thisCamera });
// through new instance
let runtimeTransformHandle = new RuntimeTransformHandle({ mainCamera: thisCamera });

Node usage:

// Import all to use extend functions
const pc = require("playcanvas");
const pcEX = require("pc-ex");

let rotation = new pc.Quat();
rotation.setLookRotation(position, target, up);


// Import named
const { DebugLine } = require("pc-ex");

DebugLine.drawLine(start, end, color);


// use ex tools
const { use, RuntimeTransformHandle } = require("pc-ex");

// through use api
let runtimeTransformHandle = use(RuntimeTransformHandle, { mainCamera: thisCamera });
// through new instance
let runtimeTransformHandle = new RuntimeTransformHandle({ mainCamera: thisCamera });

Static usage:

Old school method

<script src="./bin/pcEX.js"></script>
<script>
	
// use extend functions
let rotation = new pc.Quat();
rotation.setLookRotation(position, target, up);

// use new functions
pc.DebugLine.drawLine(start, end, color);

// use ex tools
let runtimeTransformHandle = new pc.EXTools.RuntimeTransformHandle({ mainCamera: thisCamera });

</script>

For static usage, ambient type definitions can optionally be referenced here node_modules/pc-ex/bin/pcEX.d.ts.

API Docs

API docs can be found here


For Developer:

clone repository

git clone https://github.com/TheFBplus/pc-ex.git

init development environment

npm run init

build project

npm run build

build api docs

npm run docs
0.0.41

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.44

3 years ago

0.0.45

3 years ago

0.0.46

3 years ago

0.0.47

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.36

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.50

3 years ago

0.0.48

3 years ago

0.0.49

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.25

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.19

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago