-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
21,767 additions
and
19,745 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
const PIXI = require('pixi.js') | ||
const Viewport = require('../../../').Viewport | ||
|
||
window.onload = () => | ||
{ | ||
function rand(n) | ||
{ | ||
return Math.round(Math.random() * n) | ||
} | ||
|
||
const app = new PIXI.Application({ autoresize: true }) | ||
app.view.style.textAlign = 'center' | ||
document.body.appendChild(app.view) | ||
const div = document.createElement('div') | ||
div.innerHTML = '<div>Browserify <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a>: viewport.drag().pinch().decelerate()</div>' | ||
document.body.appendChild(div) | ||
|
||
const viewport = app.stage.addChild(new Viewport({ screenWidth: app.view.offsetWidth, screenHeight: app.view.offsetHeight })) | ||
for (let i = 0; i < 10000; i++) | ||
{ | ||
const sprite = viewport.addChild(new PIXI.Sprite(PIXI.Texture.WHITE)) | ||
sprite.tint = rand(0xffffff) | ||
sprite.position.set(rand(10000), rand(10000)) | ||
} | ||
viewport | ||
.moveCenter(5000, 5000) | ||
.drag() | ||
.pinch() | ||
.decelerate() | ||
const PIXI = require('pixi.js') | ||
const Viewport = require('../../../').Viewport | ||
|
||
window.onload = () => | ||
{ | ||
function rand(n) | ||
{ | ||
return Math.round(Math.random() * n) | ||
} | ||
|
||
const app = new PIXI.Application({ autoresize: true }) | ||
app.view.style.textAlign = 'center' | ||
document.body.appendChild(app.view) | ||
const div = document.createElement('div') | ||
div.innerHTML = '<div>Browserify <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a>: viewport.drag().pinch().decelerate()</div>' | ||
document.body.appendChild(div) | ||
|
||
const viewport = app.stage.addChild(new Viewport({ screenWidth: app.view.offsetWidth, screenHeight: app.view.offsetHeight })) | ||
for (let i = 0; i < 10000; i++) | ||
{ | ||
const sprite = viewport.addChild(new PIXI.Sprite(PIXI.Texture.WHITE)) | ||
sprite.tint = rand(0xffffff) | ||
sprite.position.set(rand(10000), rand(10000)) | ||
} | ||
viewport | ||
.moveCenter(5000, 5000) | ||
.drag() | ||
.pinch() | ||
.decelerate() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<head> | ||
<style> | ||
body { | ||
text-align: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script src="index.js"></script> | ||
<head> | ||
<style> | ||
body { | ||
text-align: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script src="index.js"></script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<body> | ||
<p>Build examples for <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a></p> | ||
<p><a href="/builds/rollup/">Rollup</a></p> | ||
<p><a href="/builds/browserify/">Browserify</a></p> | ||
<p><a href="/builds/standalone/">Standalone (cdn)</a></p> | ||
<p><a href="/builds/typescript/">Typescript + Rollup</a></p> | ||
<p><a href="/builds/standalone-v4">pixi.js v4 + Standalone (cdn)</a></p> | ||
<body> | ||
<p>Build examples for <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a></p> | ||
<p><a href="/builds/rollup/">Rollup</a></p> | ||
<p><a href="/builds/browserify/">Browserify</a></p> | ||
<p><a href="/builds/standalone/">Standalone (cdn)</a></p> | ||
<p><a href="/builds/typescript/">Typescript + Rollup</a></p> | ||
<p><a href="/builds/standalone-v4">pixi.js v4 + Standalone (cdn)</a></p> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import * as PIXI from 'pixi.js' | ||
import { Viewport } from '../../../' | ||
|
||
window.onload = () => | ||
{ | ||
function rand(n) | ||
{ | ||
return Math.round(Math.random() * n) | ||
} | ||
|
||
const app = new PIXI.Application({ autoresize: true }) | ||
app.view.style.textAlign = 'center' | ||
document.body.appendChild(app.view) | ||
const div = document.createElement('div') | ||
div.innerHTML = '<div>Rollup <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a>: viewport.drag().pinch().decelerate()</div>' | ||
document.body.appendChild(div) | ||
|
||
const viewport = app.stage.addChild(new Viewport({ screenWidth: app.view.offsetWidth, screenHeight: app.view.offsetHeight })) | ||
for (let i = 0; i < 10000; i++) | ||
{ | ||
const sprite = viewport.addChild(new PIXI.Sprite(PIXI.Texture.WHITE)) | ||
sprite.tint = rand(0xffffff) | ||
sprite.position.set(rand(10000), rand(10000)) | ||
} | ||
viewport | ||
.moveCenter(5000, 5000) | ||
.drag() | ||
.pinch() | ||
.decelerate() | ||
import * as PIXI from 'pixi.js' | ||
import { Viewport } from '../../../' | ||
|
||
window.onload = () => | ||
{ | ||
function rand(n) | ||
{ | ||
return Math.round(Math.random() * n) | ||
} | ||
|
||
const app = new PIXI.Application({ autoresize: true }) | ||
app.view.style.textAlign = 'center' | ||
document.body.appendChild(app.view) | ||
const div = document.createElement('div') | ||
div.innerHTML = '<div>Rollup <a href="https://https://github.com/davidfig/pixi-viewport">pixi-viewport</a>: viewport.drag().pinch().decelerate()</div>' | ||
document.body.appendChild(div) | ||
|
||
const viewport = app.stage.addChild(new Viewport({ screenWidth: app.view.offsetWidth, screenHeight: app.view.offsetHeight })) | ||
for (let i = 0; i < 10000; i++) | ||
{ | ||
const sprite = viewport.addChild(new PIXI.Sprite(PIXI.Texture.WHITE)) | ||
sprite.tint = rand(0xffffff) | ||
sprite.position.set(rand(10000), rand(10000)) | ||
} | ||
viewport | ||
.moveCenter(5000, 5000) | ||
.drag() | ||
.pinch() | ||
.decelerate() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<head> | ||
<style> | ||
body { | ||
text-align: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script src="index.js"></script> | ||
<head> | ||
<style> | ||
body { | ||
text-align: center; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script src="index.js"></script> | ||
</body> |
Oops, something went wrong.