Added minimal navigation breadcrumbs to doctests.

This commit is contained in:
2023-05-09 13:25:39 +02:00
parent 13e0473328
commit 9501264f08
71 changed files with 5700 additions and 5332 deletions
+10 -5
View File
@@ -4,13 +4,15 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PIXI Scatter Resolution Doctest</title>
<link rel="stylesheet" href="../3rdparty/highlight/styles/default.css" />
<link rel="stylesheet" href="../../css/doctest.css" />
<script src="../../dist/iwmlib.3rdparty.js"></script>
<script src="../../dist/iwmlib.js"></script>
<script src="../../dist/iwmlib.pixi.js"></script>
</head>
<body>
<h1><a href="../index.html">lib.</a><a href="index.html">pixi.</a>Scatter Resolution</h1>
<canvas id="canvas" />
<script>
const app = new PIXIApp({
@@ -29,7 +31,7 @@
'../examples/front__1_dpi600.png',
'../examples/front__1_dpi1200.png'
],
sprites => {
(sprites) => {
app.scatterContainerFront = new ScatterContainer(app.renderer, { app })
app.scatterContainerBack = new ScatterContainer(app.renderer, { app })
@@ -105,12 +107,15 @@
// renderTexture
//--------------------
sprites.forEach(value => {
sprites.forEach((value) => {
const matrix = new PIXI.Matrix()
matrix.translate(-value.x, -value.y)
const texture = PIXI.RenderTexture.create({ width: value.width, height: value.height, resolution: 2 })
const texture = PIXI.RenderTexture.create({
width: value.width,
height: value.height,
resolution: 2
})
app.renderer.render(value, texture, true, matrix)
const sprite = new PIXI.Sprite(texture)